package com.lagou.mapper;

import com.lagou.model.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {


    /**
     * 根据用户名查客户是否存在
     * @param username
     * @return
     */
    public int checkUserName(String username);

    /**
     * 用户登录
     * @param username
     * @param md5Password
     * @return
     */
    public User selectLogin(@Param("username") String username, @Param("password") String md5Password);

    /**
     * 用户列表
     * @return
     */
    public List<User> userList();

    public int checkEmail(String str);

    public int insert(User user);

    public int deleteByPrimary(int id);

    public User selectByPrimaryKey(int userId);

    public int update(User user);
}
